home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / patch / WHDIGamesC-D.lzh / Colgate.lha / ColgateHD / Install < prev    next >
Text File  |  1980-02-22  |  3KB  |  139 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "data")        ;sub directory containing data files
  4. (set #readme-file "Colgate.readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. (if
  24.   (exists #readme-file)
  25.   (if 
  26.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  27.     ("")
  28.     (run ("SYS:Utilities/More %s" #readme-file))
  29.   )
  30. )
  31.  
  32. (set #program "WHDLoad")
  33. (P_chkrun)
  34.  
  35. (set #program "XFDDecrunch")
  36. (P_chkrun)
  37.  
  38. (set @default-dest
  39.   (askdir
  40.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  41.     (help @askdir-help)
  42.     (default @default-dest)
  43.     (disk)
  44.   )
  45. )
  46. (set #dest (tackon @default-dest @app-name))
  47. (if
  48.   (exists #dest)
  49.   (
  50.     (set #choice
  51.       (askbool
  52.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  53.         (default 1)
  54.         (choices "Delete" "Skip")
  55.         (help @askbool-help)
  56.       )
  57.     )
  58.     (if
  59.       (= #choice 1)
  60.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  61.     )
  62.   )
  63. )
  64. (makedir #dest
  65.   (help @makedir-help)
  66.   (infos)
  67. )
  68.  
  69. ;----------------------------
  70.  
  71. (copyfiles
  72.   (help @copyfiles-help)
  73.   (source ("%s.slave" @app-name))
  74.   (dest #dest)
  75. )
  76. (if
  77.   (exists ("%s.newicon" @app-name))
  78.   (set #icon
  79.     (askchoice
  80.       (prompt "\nWhich icon do you like to install ?\n")
  81.       (default 0)
  82.       (choices "Normal" "NewIcon")
  83.       (help @askchoice-help)
  84.     )
  85.   )
  86.   (set #icon 0)
  87. )
  88. (select #icon
  89.   (set #icon ("%s.inf" @app-name))
  90.   (set #icon ("%s.newicon" @app-name))
  91. )
  92. (copyfiles
  93.   (help @copyfiles-help)
  94.   (source #icon)
  95.   (newname ("%s.info" @app-name))
  96.   (dest #dest)
  97. )
  98. (if
  99.   (exists #readme-file)
  100.   (copyfiles
  101.     (help @copyfiles-help)
  102.     (source #readme-file)
  103.     (dest #dest)
  104.   )
  105. )
  106. (if
  107.   (exists ("%s.info" #readme-file))
  108.   (copyfiles
  109.     (help @copyfiles-help)
  110.     (source ("%s.info" #readme-file))
  111.     (dest #dest)
  112.   )
  113. )
  114. (if
  115.   (= #sub-dir "")
  116.   ("")
  117.   (
  118.     (set #dest (tackon #dest #sub-dir))
  119.     (makedir #dest
  120.       (help @makedir-help)
  121.     )
  122.   )
  123. )
  124.  
  125. ;----------------------------
  126.  
  127. (message "Insert Colgate disk in DF0:")
  128.  
  129. (copyfiles
  130.   (help @copyfiles-help)
  131.   (source ("df0:"))
  132.   (dest #dest)
  133.   (all)
  134. )
  135.  
  136. (run ("cd \"%s\"\nxfdDecrunch loader" #dest))
  137.  
  138. (exit)
  139.